import request from '@/utils/request'

// 查询播放器配置列表
export function listPlayer(query) {
  return request({
    url: '/basic/player/list',
    method: 'get',
    params: query
  })
}

// 查询启用的播放器配置列表
export function activePlayerList() {
  return request({
    url: '/basic/player/activeList',
    method: 'get'
  })
}

// 查询播放器配置详细
export function getPlayer(playerId) {
  return request({
    url: '/basic/player/' + playerId,
    method: 'get'
  })
}

// 新增播放器配置
export function addPlayer(data) {
  return request({
    url: '/basic/player',
    method: 'post',
    data: data
  })
}

// 修改播放器配置
export function updatePlayer(data) {
  return request({
    url: '/basic/player',
    method: 'put',
    data: data
  })
}

// 删除播放器配置
export function delPlayer(playerId) {
  return request({
    url: '/basic/player/' + playerId,
    method: 'delete'
  })
}

// 校验播放器标识唯一性
export function checkCodeUnique(player) {
  return request({
    url: '/basic/player/checkCodeUnique',
    method: 'get',
    params: player
  })
}
